﻿#include "parameteritem.h"

ParameterItem::ParameterItem(QObject *parent)
    : QObject{parent}
{

}

void ParameterItem::clear()
{
    m_id = 0;
    m_Name = "";
    m_Number = "";
    m_Knife = "";
    m_Roller = "";
    m_Stress01 = "";
    m_Stress02 = "";
    m_Stress03 = "";
    m_F_Knife01 = "";
    m_F_Knife02 = "";
    m_F_Knife03 = "";
    m_B_Knife01 = "";
    m_B_Knife02 = "";
    m_B_Knife03 = "";
}

void ParameterItem::copyItem(ParameterItem *item)
{
    m_id = item->id();
    m_Name = item->Name();
    m_Number = item->Number();
    m_Knife = item->Knife();
    m_Roller = item->Roller();
    m_Stress01 = item->Stress01();
    m_Stress02 = item->Stress02();
    m_Stress03 = item->Stress03();
    m_F_Knife01 = item->F_Knife01();
    m_F_Knife02 = item->F_Knife02();
    m_F_Knife03 = item->F_Knife03();
    m_B_Knife01 = item->B_Knife01();
    m_B_Knife02 = item->B_Knife02();
    m_B_Knife03 = item->B_Knife03();
}

int ParameterItem::id() const
{
    return m_id;
}

void ParameterItem::setId(int newId)
{
    if (m_id == newId)
        return;
    m_id = newId;
    emit idChanged();
}

QString ParameterItem::Name() const
{
    return m_Name;
}

void ParameterItem::setName(const QString &newName)
{
    if (m_Name == newName)
        return;
    m_Name = newName;
    emit NameChanged();
}

QString ParameterItem::Number() const
{
    return m_Number;
}

void ParameterItem::setNumber(const QString &newNumber)
{
    if (m_Number == newNumber)
        return;
    m_Number = newNumber;
    emit NumberChanged();
}

QString ParameterItem::Knife() const
{
    return m_Knife;
}

void ParameterItem::setKnife(const QString &newKnife)
{
    if (m_Knife == newKnife)
        return;
    m_Knife = newKnife;
    emit KnifeChanged();
}

QString ParameterItem::Roller() const
{
    return m_Roller;
}

void ParameterItem::setRoller(const QString &newRoller)
{
    if (m_Roller == newRoller)
        return;
    m_Roller = newRoller;
    emit RollerChanged();
}

QString ParameterItem::Stress01() const
{
    return m_Stress01;
}

void ParameterItem::setStress01(const QString &newStress01)
{
    if (m_Stress01 == newStress01)
        return;
    m_Stress01 = newStress01;
    emit Stress01Changed();
}

QString ParameterItem::Stress02() const
{
    return m_Stress02;
}

void ParameterItem::setStress02(const QString &newStress02)
{
    if (m_Stress02 == newStress02)
        return;
    m_Stress02 = newStress02;
    emit Stress02Changed();
}

QString ParameterItem::Stress03() const
{
    return m_Stress03;
}

void ParameterItem::setStress03(const QString &newStress03)
{
    if (m_Stress03 == newStress03)
        return;
    m_Stress03 = newStress03;
    emit Stress03Changed();
}

QString ParameterItem::F_Knife01() const
{
    return m_F_Knife01;
}

void ParameterItem::setF_Knife01(const QString &newF_Knife01)
{
    if (m_F_Knife01 == newF_Knife01)
        return;
    m_F_Knife01 = newF_Knife01;
    emit F_Knife01Changed();
}

QString ParameterItem::F_Knife02() const
{
    return m_F_Knife02;
}

void ParameterItem::setF_Knife02(const QString &newF_Knife02)
{
    if (m_F_Knife02 == newF_Knife02)
        return;
    m_F_Knife02 = newF_Knife02;
    emit F_Knife02Changed();
}

QString ParameterItem::F_Knife03() const
{
    return m_F_Knife03;
}

void ParameterItem::setF_Knife03(const QString &newF_Knife03)
{
    if (m_F_Knife03 == newF_Knife03)
        return;
    m_F_Knife03 = newF_Knife03;
    emit F_Knife03Changed();
}

QString ParameterItem::B_Knife01() const
{
    return m_B_Knife01;
}

void ParameterItem::setB_Knife01(const QString &newB_Knife01)
{
    if (m_B_Knife01 == newB_Knife01)
        return;
    m_B_Knife01 = newB_Knife01;
    emit B_Knife01Changed();
}

QString ParameterItem::B_Knife02() const
{
    return m_B_Knife02;
}

void ParameterItem::setB_Knife02(const QString &newB_Knife02)
{
    if (m_B_Knife02 == newB_Knife02)
        return;
    m_B_Knife02 = newB_Knife02;
    emit B_Knife02Changed();
}

QString ParameterItem::B_Knife03() const
{
    return m_B_Knife03;
}

void ParameterItem::setB_Knife03(const QString &newB_Knife03)
{
    if (m_B_Knife03 == newB_Knife03)
        return;
    m_B_Knife03 = newB_Knife03;
    emit B_Knife03Changed();
}
